<%@ Page Language="VB"  AutoEventWireup="false" CodeBehind="Admin.aspx.vb" Inherits="nFlickrViewer.Admin" %>
<%@ Register Assembly="ColorPicker" Namespace="ColorPickerTest" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>nFlickrViewer Administrative Tools</title>
   <link rel="stylesheet" href="style.css" type="text/css" media="all" title="FlickrViewer Styles" charset="utf-8" />

<script language="javascript" type="text/javascript">
 function closeWindow()
 {
    if(window)
        window.close();
    if(opener)
        opener.location.reload();
 }
 function refreshParent()
 {
    if(opener)
        opener.location.reload();
 
 }
 </script>
</head>
<body>
    <form id="form1" runat="server" >
    <asp:label runat="server" ID="Label2" cssClass="Header">Admin Section:</asp:label><br /><br />
        <asp:Panel Width="400px" ID="pnlLogin" runat="server" defaultbutton="btnSubmit" > 
        
        
           <hr width="75%" />
       <table Width="400px" cellpadding="0" cellspacing="0" border="0">
         <tr>
                <th colspan="2" align="center">
                    <asp:Label ID="lblLogin" runat="server" Text="Label">Administrative Login:</asp:Label>
                </th>
               
            </tr>
            <tr>
                <td>  <asp:label runat="server" ID="lblPassword" >Password</asp:label>
                </td>
                <td ><asp:TextBox CssClass="smallerTextBox" runat="server" TextMode="Password" ID="txtPassword" AutoCompleteType="Disabled" CausesValidation="True"></asp:TextBox>
           <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtPassword"
                Display="Dynamic" ErrorMessage="<BR>Please enter your password. System default is 'password'." SetFocusOnError="True" Width="200px"></asp:RequiredFieldValidator>
                
                 <asp:CustomValidator ID="cvPassword"
                           Runat="server"
                           ControlToValidate="txtPassword"
                           Display="Dynamic"
                           OnServerValidate="ValidatePassword"
                           ErrorMessage="<BR>Invalid password. System default is 'password'." />
                           
               </td>
           </tr>
           <tr><td colspan="2">
             <asp:Button CssClass="smallerTextBox" ID="btnSubmit" runat="server" Text="Submit" />&nbsp;
         <asp:Button CssClass="smallerTextBox" ID="btnCancel1" runat="server" Text="Cancel" CausesValidation="False" onClientClick="javascript:closeWindow();"  />
     
           </td></tr>
        
           </table>
        </asp:Panel>
        
         <asp:Panel Width="400px" ID="pnlChangePassword" runat="server" defaultbutton="btnSubmitChangePassword" > 
        
        
        
           <hr width="75%" />
       <table Width="400px" cellpadding="0" cellspacing="0" border="0">
         <tr>
                <th colspan="2" align="center">
                    <asp:Label ID="lblChangePassowrdHeader" runat="server" Text="Label">Change Password:</asp:Label>
                </th>
               
            </tr>
            <tr>
                <td>  <asp:label runat="server" ID="lblOldPassword" >Old Password:</asp:label>
                </td>
                <td >   <asp:TextBox CssClass="smallerTextBox" runat="server" TextMode="Password" ID="txtOldPassword" AutoCompleteType="Disabled" CausesValidation="True"></asp:TextBox>
           <asp:RequiredFieldValidator ID="rfvOldPassword" runat="server" ControlToValidate="txtOldPassword"
                Display="Dynamic" ErrorMessage="<BR>Please enter your old password." SetFocusOnError="True" Width="200px"></asp:RequiredFieldValidator>
                
                 <asp:CustomValidator ID="cvOldPassword"
                           Runat="server"
                           ControlToValidate="txtOldPassword"
                           Display="Dynamic"
                           OnServerValidate="ValidatePassword"
                           ErrorMessage="<BR>Invalid password." />
                
                </td></tr>
        <tr>
                <td> 
     
                           
                  <asp:label runat="server" ID="lblNewPassword1" >New Password:</asp:label>
       </td><td> <asp:TextBox CssClass="smallerTextBox" runat="server" TextMode="Password" ID="txtNewPassword1" AutoCompleteType="Disabled" CausesValidation="True"></asp:TextBox>
         <asp:RequiredFieldValidator ID="rfvNewPassword1" runat="server" ControlToValidate="txtNewPassword2"
                Display="Dynamic" ErrorMessage="<BR>Please enter your new password." SetFocusOnError="True" Width="200px"></asp:RequiredFieldValidator>
          
  </td></tr>
        <tr>
                <td> 
                           
                            <asp:label runat="server" ID="lblNewPassword2" >Confirm New Password:</asp:label>
       </td><td> <asp:TextBox CssClass="smallerTextBox" runat="server" TextMode="Password" ID="txtNewPassword2" AutoCompleteType="Disabled" CausesValidation="True"></asp:TextBox>
        
         <asp:RequiredFieldValidator ID="rfvNewPassword2" runat="server" ControlToValidate="txtNewPassword2"
                Display="Dynamic" ErrorMessage="<BR>Please confirm your new password." SetFocusOnError="True" Width="200px"></asp:RequiredFieldValidator>
          
           <asp:CompareValidator
                id="cvNewPassword" 
                Display="dynamic"
                ControlToValidate="txtNewPassword1" 
                ControlToCompare="txtNewPassword2" 
                ForeColor="red" 
                Type="String"
                EnableClientScript="false" 
                Text="Please make sure your new passwords match." 
                runat="server" /> 
   </td></tr>
        <tr><td colspan="2">
          <asp:Button CssClass="smallerTextBox" ID="btnSubmitChangePassword" runat="server" Text="Submit" />&nbsp;
         <asp:Button CssClass="smallerTextBox" ID="btnCancelChangePassword" runat="server" Text="Cancel" CausesValidation="False" />
      
        </td></tr></table> 
          
        </asp:Panel>
        
        <asp:Panel ID="pnlConfig" runat="server"   >
        <asp:Panel  ID="pnlConfigFlickr" runat="server" DefaultButton="btnSave" >
      
        <hr width="75%" />
        <table Width="400px" cellpadding="0" cellspacing="0" border="0">
         <tr>
                <th colspan="2" align="center">
                    <asp:Label ID="Label12" runat="server" Text="Label">Flickr Configuration:</asp:Label>
                </th>
               
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label1" runat="server" Text="Your Flickr Api Key:" ></asp:Label>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="required" ControlToValidate="txtFlickrApiKey"></asp:RequiredFieldValidator>
                        
                </td>
                <td ><asp:TextBox CssClass="smallerTextBox" ID="txtFlickrApiKey" runat="server" Width="200px" ToolTip="This field is required. Get yours here http://www.flickr.com/services/api/keys/ ."></asp:TextBox>
                
                  <asp:CustomValidator ID="cuvFlickrApiKey"
                           Runat="server"
                           ControlToValidate="txtFlickrApiKey"
                           Display="Dynamic"
                           OnServerValidate="ValidateFlickrApiKey"
                           ErrorMessage="Invalid Flickr API Key" />
                </td>
               
            </tr>
                        <tr>
                <td>
                    <asp:Label ID="Label6" runat="server" Text="Your Flickr UserName"></asp:Label>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="required" ControlToValidate="txtFlickrUserName" Display="Dynamic" SetFocusOnError="True"></asp:RequiredFieldValidator></td>
                <td >
                    <asp:TextBox CssClass="smallerTextBox" ID="txtFlickrUserName" runat="server" Width="200px" ToolTip="the plain-text username, aka your screenname here http://www.flickr.com/account ."></asp:TextBox>
                    
                     <asp:CustomValidator ID="cvFlickrUserName"
                           Runat="server"
                           ControlToValidate="txtFlickrUserName"
                           Display="Dynamic"
                           OnServerValidate="ValidateFlickrUsername"
                           ErrorMessage="Invalid Flickr Username" /></td>
                
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label3" runat="server" Text="Running Mode"></asp:Label></td>
                <td ><asp:DropDownList ID="ddlrunningMode" runat="server" Width="206px">
                    <asp:ListItem>user</asp:ListItem>
                    <asp:ListItem>set</asp:ListItem>
                    <asp:ListItem>tag</asp:ListItem>
                    <asp:ListItem>text</asp:ListItem>
                    <asp:ListItem>group</asp:ListItem>
                    </asp:DropDownList></td>
               
            </tr>

             <tr>
                <td>
                    <asp:Label ID="Label8" runat="server" Text="Flickr Image Size"></asp:Label></td>
                <td ><asp:DropDownList ID="ddlFlickrImageSize" runat="server" Width="206px" ToolTip="Flickr can return 3 different sizes">
                    <asp:ListItem>small</asp:ListItem>
                    <asp:ListItem>med</asp:ListItem>
                    <asp:ListItem>large</asp:ListItem>
                </asp:DropDownList></td>
                
            </tr>
              <tr>
                <td>
                    <asp:Label ID="Label44" runat="server" Text="Sort Order"></asp:Label></td>
                <td ><asp:DropDownList ID="ddlFlickrSortOrder" runat="server" ToolTip="Choose from your flickr sets" Width="206px">
                </asp:DropDownList> </td>
                
            </tr>
            
            <tr>
                <td>
                    <asp:Label ID="Label4" runat="server" Text="Set"></asp:Label></td>
                <td ><asp:DropDownList ID="ddlFlickrSet" runat="server" ToolTip="Choose from your flickr sets" Width="206px">
                </asp:DropDownList></td>
                
            </tr>
            
            <tr>
                <td>
                    <asp:Label ID="Label11" runat="server" Text="Flickr Group"></asp:Label></td>
                <td ><asp:DropDownList ID="ddlFlickrGroup" runat="server" ToolTip="Choose from your flickr groups" Width="206px">
                </asp:DropDownList></td>
                
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label5" runat="server" Text="Tag(s)"></asp:Label></td>
                <td >
                    <asp:TextBox CssClass="smallerTextBox" ID="txtFlickrTag" runat="server" Width="200px" ToolTip="separate multiple tags with a comma"></asp:TextBox></td>
                
            </tr>
            
            <tr>
                <td>
                    <asp:Label ID="Label7" runat="server" Text="SearchTerm"></asp:Label></td>
                <td >
                    <asp:TextBox CssClass="smallerTextBox" ID="txtFlickrSearchTerm" runat="server" Width="200px"></asp:TextBox></td>
                
            </tr>
           
            <tr>
                <td>
                    <asp:Label ID="Label9" runat="server" Text="flickrStaticImageUrl"></asp:Label></td>
                <td >    
                  <asp:TextBox CssClass="smallerTextBox" ID="txtFlickrStaticImageUrl" runat="server" Width="200px"></asp:TextBox>
                
                     
         </td>
                
            </tr>
          
            
            <tr>
                <td>
                    <asp:Label ID="Label14" runat="server" Text="Maximum Number of Results"></asp:Label></td>
                <td >
                       <asp:TextBox CssClass="smallerTextBox" ID="txtFlickrMaxNoResults" runat="server" Width="200px" Tooltip="SimpleViewer suggests < 50 for best performance"></asp:TextBox>
               </td>
                
            </tr>
             <tr>
                <td>
                    <asp:Label ID="Label10" runat="server" Text="Cache Interval (seconds)"></asp:Label></td>
                <td >
                       <asp:TextBox CssClass="smallerTextBox" ID="txtFlickrCacheInterval" runat="server" Width="200px"  Tooltip="0 for none - 43,2000 12 hours (default)"></asp:TextBox>
               </td>
                
            </tr>
            
             
            
        </table></asp:Panel>
     
     
        <asp:Panel  ID="pnlConfigSimpleViewer" runat="server" 
         >
      
        <hr width="75%" />
       <table Width="400px" cellpadding="0" cellspacing="0" border="0">
         <tr>
                <th colspan="2" align="center">
                    <asp:Label ID="lblSVConfig" runat="server" Text="Label">Simple Viewer Configuration:</asp:Label>
                </th>
               
            </tr>
            <tr>
                <td>
                    <asp:Label Width="139px" ID="lblmaxImageHeight" runat="server" Text="Max Image Height" ></asp:Label>
                    <asp:RequiredFieldValidator ID="rfvMaxImageHeight" runat="server" ErrorMessage="required" ControlToValidate="txtMaxImageHeight" Display="Dynamic" SetFocusOnError="True"></asp:RequiredFieldValidator>
                </td>
                <td ><asp:TextBox CssClass="smallerTextBox" ID="txtMaxImageHeight" runat="server" Width="200px" ToolTip="Default is 640"></asp:TextBox>
               </td>
           </tr>
                           <tr>
                <td>
                    <asp:Label ID="lblmaxImageWidth" runat="server" Text="Max Image Height" ></asp:Label>
                        
                </td>
                <td ><asp:TextBox CssClass="smallerTextBox" ID="txtMaxImageWidth" runat="server" Width="200px" ToolTip="Default is 640"></asp:TextBox>
               </td>
           </tr>
                                               <tr>
                <td>
                    <asp:Label ID="lblthumbnailColumns" runat="server" Text="Thumbnail Columns"></asp:Label>
                    </td>
                <td >
                    <asp:DropDownList ID="ddlThumbnailColumns" runat="server" Width="206px" >
                    <asp:ListItem value="1">1</asp:ListItem>
                    <asp:ListItem value="2">2</asp:ListItem>
                    <asp:ListItem value="3">3</asp:ListItem>
                    <asp:ListItem value="4">4</asp:ListItem>
                    <asp:ListItem value="5">5</asp:ListItem>
                    <asp:ListItem value="6">6</asp:ListItem>
                    <asp:ListItem value="7">7</asp:ListItem>
                    <asp:ListItem value="8" >8</asp:ListItem>
                    <asp:ListItem value="9" >9</asp:ListItem>
                    </asp:DropDownList>
                </td>
                
            </tr>
                 
                                  <tr>
                <td>
                    <asp:Label ID="lblthumbnailRows" runat="server" Text="Thumbnail Rows"></asp:Label>
                </td>
                <td >
                     <asp:DropDownList ID="ddlThumbnailRows" runat="server" Width="206px" >
                    <asp:ListItem value="1"></asp:ListItem>
                    <asp:ListItem value="2"></asp:ListItem>
                    <asp:ListItem value="3"></asp:ListItem>
                    <asp:ListItem value="4"></asp:ListItem>
                    <asp:ListItem value="5"></asp:ListItem>
                    <asp:ListItem value="6"></asp:ListItem>
                    <asp:ListItem value="7"></asp:ListItem>
                    <asp:ListItem value="8" ></asp:ListItem>
                    <asp:ListItem value="9" ></asp:ListItem>
                    </asp:DropDownList>
                </td>
                
            </tr>
            
            
                  <tr>
                <td>
                    <asp:Label ID="lblNavDirection" runat="server" Text="Navigation Direction"></asp:Label>
                </td>
                <td >
                     <asp:DropDownList ID="ddlNavDirection" runat="server" Width="206px" >
                    <asp:ListItem value="LTR">Left-To-Right</asp:ListItem>
                    <asp:ListItem value="RTL">Right-To-Left</asp:ListItem>
                    </asp:DropDownList>
                </td>
                
            </tr>
            
             <tr>
                <td>
                    <asp:Label ID="lblnavPosition" runat="server" Text="Navigation Position"></asp:Label>
                </td>
                <td >
                     <asp:DropDownList ID="ddlNavPosition" runat="server" Width="206px" >
                    <asp:ListItem value="top">top</asp:ListItem>
                    <asp:ListItem value="right">right</asp:ListItem>
                    <asp:ListItem value="bottom">bottom</asp:ListItem>
                    <asp:ListItem value="left">left</asp:ListItem>
                    </asp:DropDownList>
                </td>
                
            </tr>     
                          <tr>
                <td>
                    <asp:Label ID="lblTextColor" runat="server" Text="Text Color" ></asp:Label>
                        
                </td>
                <td >
                  <cc1:ColorPicker ID="cpTextColor" runat="server"></cc1:ColorPicker>
                
               </td>
           </tr>
           
            
                               <tr>
                <td>
                    <asp:Label ID="lblFrameColor" runat="server" Text="Frame Color" ></asp:Label>
                        
                </td>
                <td >
                  <cc1:ColorPicker ID="cpFrameColor" runat="server"></cc1:ColorPicker>
                
               </td>
           </tr>
           
           

           
           
                        <tr>
                <td>
                    <asp:Label ID="lblFrameWidth" runat="server" Text="Frame Width"></asp:Label>
                    <asp:RequiredFieldValidator ID="rfvFrameWidth" runat="server" ErrorMessage="required" ControlToValidate="txtFrameWidth" Display="Dynamic" SetFocusOnError="True"></asp:RequiredFieldValidator></td>
                <td >
                    <asp:TextBox CssClass="smallerTextBox" ID="txtFrameWidth" runat="server" Width="200px" ></asp:TextBox>
                </td>
                
            </tr>
            
                                  <tr>
                <td>
                    <asp:Label ID="lblStagePadding" runat="server" Text="Frame Width"></asp:Label>
                    <asp:RequiredFieldValidator ID="rfvStagePadding" runat="server" ErrorMessage="required" ControlToValidate="txtStagePadding" Display="Dynamic" SetFocusOnError="True"></asp:RequiredFieldValidator></td>
                <td >
                    <asp:TextBox CssClass="smallerTextBox" ID="txtStagePadding" runat="server" Width="200px" ></asp:TextBox>
                </td>
                
            </tr>
            
            

                       <tr>
                <td>
                    <asp:Label ID="lblgalleryTitle" runat="server" Text="Gallery Title"></asp:Label>
                    <asp:RequiredFieldValidator ID="rfvgalleryTitle" runat="server" ErrorMessage="required" ControlToValidate="txtgalleryTitle" Display="Dynamic" SetFocusOnError="True"></asp:RequiredFieldValidator></td>
                <td >
                    <asp:TextBox CssClass="smallerTextBox" ID="txtgalleryTitle" runat="server" Width="200px" ></asp:TextBox>
                </td>
                
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblbackgroundImagePath" runat="server" Text="Background Image Path"></asp:Label>
                </td>
                <td >
                    <asp:TextBox CssClass="smallerTextBox" ID="txtBackgroundImagePath" runat="server" Width="200px" ></asp:TextBox>
                </td>
            </tr>
                  
            
               <tr>
                <td>
                    <asp:Label ID="lblenableRightClickOpen" runat="server" Text="Enable Right Click Open"></asp:Label>
                </td>
                <td >
                   <div id="FullHeight"> <asp:CheckBox ID="chkenableRightClickOpen" runat="server"  ></asp:CheckBox>
                   </div>
                </td>
            </tr>  
             <tr>
                <td>
                    <asp:Label ID="lblincludeImageName" runat="server" Text="Include Image Name"></asp:Label>
                </td>
                <td >
                    <asp:CheckBox ID="chkincludeImageName" runat="server"  ></asp:CheckBox>
                </td>
            </tr>  
             <tr>
                <td>
                    <asp:Label ID="lblincludeImageLink" runat="server" Text="Include Flickr Image Link"></asp:Label>
                </td>
                <td >
                    <asp:CheckBox ID="chkincludeImageLink" runat="server"  ></asp:CheckBox>
                </td>
            </tr>  
             <tr>
                <td>
                    <asp:Label ID="lbl" runat="server" Text="Include Paypal Link"></asp:Label>
                </td>
                <td >
                    <asp:CheckBox ID="chkincludePaypalLink" runat="server"   ></asp:CheckBox>
                </td>
            </tr>  
                  <tr>
                <td>
                    <asp:Label ID="lblcontactMeEmailAddress" runat="server" Text="Contact Me Email Address"></asp:Label>
                </td>
                <td >
                    <asp:TextBox CssClass="smallerTextBox" ID="txtcontactMeEmailAddress" runat="server" Width="200px" ></asp:TextBox>
                    <asp:RegularExpressionValidator id="regcontactMeEmailAddress" runat="server"
                        ControlToValidate="txtcontactMeEmailAddress"
                        ValidationExpression=".*@.*\..*"
                        ErrorMessage="Invalid e-mail address"
                        display="dynamic">
                    </asp:RegularExpressionValidator>
                </td>
            </tr>    
            
               <tr>
                <td>
                    <asp:Label ID="lblpaypalCartLink" runat="server" Text="Paypal Cart Link"></asp:Label>
                </td>
                <td >
                    <asp:TextBox CssClass="smallerTextBox" ID="txtpaypalCartLink" runat="server" Width="200px" ></asp:TextBox>
                </td>
            </tr>   
               <tr>
                <td>
                    <asp:Label ID="lblpaypalEmailAddress" runat="server" Text="Paypal Cart Email Address"></asp:Label>
                </td>
                <td >
                    <asp:TextBox CssClass="smallerTextBox" ID="txtpaypalEmailAddress" runat="server" Width="200px" ></asp:TextBox>
                    
                     <asp:RegularExpressionValidator id="regpaypalEmailAddress" runat="server"
                        ControlToValidate="txtpaypalEmailAddress"
                        ValidationExpression=".*@.*\..*"
                        ErrorMessage="Invalid e-mail address"
                        display="dynamic">
                    </asp:RegularExpressionValidator>
                </td>
            </tr>   
               
                     <tr>
                <td>
                    <asp:Label ID="lblpaypalPricePerItem" runat="server" Text="Paypal Price Per Item"></asp:Label>
                </td>
                <td >
                    <asp:TextBox CssClass="smallerTextBox" ID="txtpaypalPricePerItem" runat="server" Width="200px" ></asp:TextBox>
                </td>
            </tr>  
            
        </table></asp:Panel>
        
        </asp:Panel>
        <asp:Panel id="pnlButtons" runat="server" width="400px">
        <table Width="400" cellpadding="0" cellspacing="0" border="0"><tr>
                <td  align="right" height="30" valign="middle">
                <asp:Label id="lblError" runat="server" ForeColor="Red"></asp:Label><asp:Button CssClass="smallerTextBox" id="btnReloadMain" CausesValidation="False" runat="server" text="Reload Main"
                onclientclick="javascript:refreshParent();" />
                    <asp:Button CssClass="smallerTextBox" id="btnChangePassword" CausesValidation="False" runat="server" text="Change Password" />
                <asp:Button CssClass="smallerTextBox" ID="btnSave" runat="server" Text="Save Config" 
                />
            <asp:Button CssClass="smallerTextBox" ID="btnCancel" runat="server" Text="Cancel" CausesValidation="False" onClientClick="javascript:closeWindow();"  />
                </td>
                </tr></table>
         
         </asp:Panel>
         
    </form>
</body>
</html>
